﻿using SD.Infrastructure.DTOBase;
using SlamDunk.MES.IAppService.DTOs.Outputs.FoundationContext;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace SlamDunk.MES.IAppService.DTOs.Outputs.ResourceContext
{
    /// <summary>
    /// 物料定义数据传输对象
    /// </summary>
    [DataContract]
    public class MaterialInfo : BaseDTO
    {
        #region ERP编号 —— string ErpNo
        /// <summary>
        /// ERP编号
        /// </summary>
        [DataMember]
        public string ErpNo { get; set; }
        #endregion

        #region 基准单位编号 —— string StandardUnitNo
        /// <summary>
        /// 基准单位编号
        /// </summary>
        [DataMember]
        public string StandardUnitNo { get; set; }
        #endregion

        #region 规格 —— string Specification
        /// <summary>
        /// 规格
        /// </summary>
        [DataMember]
        public string Specification { get; set; }
        #endregion

        #region 保质期 —— TimeSpan GuaranteePeriod
        /// <summary>
        /// 保质期
        /// </summary>
        [DataMember]
        public TimeSpan GuaranteePeriod { get; set; }
        #endregion

        #region 物料来源 —— MaterialSourceType? MaterialSourceType
        /// <summary>
        /// 物料来源
        /// </summary>
        [DataMember]
        public MaterialSourceType? MaterialSourceType { get; set; }
        #endregion

        #region 是否按批次管理 —— bool HasLot
        /// <summary>
        /// 是否按批次管理
        /// </summary>
        [DataMember]
        public bool HasLot { get; set; }
        #endregion

        #region 工厂模型Id —— Guid? FacilityId
        /// <summary>
        /// 工厂模型Id
        /// </summary>
        [DataMember]
        public Guid? FacilityId { get; set; }
        #endregion

        #region 数据来源 —— string DataSource
        /// <summary>
        /// 数据来源
        /// </summary>
        [DataMember]
        public string DataSource { get; set; }
        #endregion

        #region 是否启用 —— bool Enabled
        /// <summary>
        /// 是否启用
        /// </summary>
        [DataMember]
        public bool Enabled { get; set; }
        #endregion

        #region 停用原因 —— string DisabledReason
        /// <summary>
        /// 停用原因
        /// </summary>
        [DataMember]
        public string DisabledReason { get; set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        [DataMember]
        public string Description { get; set; }
        #endregion

        #region 所属物料类Id集 —— IEnumerable<Guid> RelatedClassIds
        /// <summary>
        /// 所属物料类Id集
        /// </summary>
        [DataMember]
        public IEnumerable<Guid> RelatedClassIds { get; set; }
        #endregion


        //导航属性

        #region 导航属性 - 物料包装 —— MaterialPackInfo MaterialPackInfo
        /// <summary>
        /// 导航属性 - 物料包装
        /// </summary>
        [DataMember]
        public MaterialPackInfo MaterialPackInfo { get; set; }
        #endregion

        #region 导航属性 - 物料条码设置 —— MaterialBarcodeSettingInfo MaterialBarcodeSettingInfo
        /// <summary>
        /// 导航属性 - 物料条码设置
        /// </summary>
        [DataMember]
        public MaterialBarcodeSettingInfo MaterialBarcodeSettingInfo { get; set; }
        #endregion

        #region 导航属性 - 工厂模型 —— FacilityInfo FacilityInfo
        /// <summary>
        /// 导航属性 - 工厂模型
        /// </summary>
        [DataMember]
        public FacilityInfo FacilityInfo { get; set; }
        #endregion
    }
}
